// ==UserScript==
// @name         微博元素简化
// @namespace    http://tampermonkey.net/
// @version      0.0.2-2025-08-19
// @description
// @match        https://weibo.com/**
// @icon         https://weibo.com/favicon.ico
// @author       AgMonk
// @homepage     https://gitee.com/AgMonk/tampermonkey-script
// @downloadURL https://gitee.com/AgMonk/tampermonkey-script/raw/master/weibo/weibo-element-simplify.user.js
// @updateURL https://gitee.com/AgMonk/tampermonkey-script/raw/master/weibo/weibo-element-simplify.user.js
// @require      https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js

// ==/UserScript==

(function () {

	// 按class 移除元素
    const removeByClassName =(className)=>{
        [...document.getElementsByClassName(className)].forEach(e=>e.remove())
    }

    setInterval(() => {
        // 拉黑警告
        removeByClassName('RepostCommentList_mar2_bSuVs')
        // 打赏按钮
        removeByClassName('wrap Reward_box_27GVq')
    	
    	// 修改热搜界面宽度
		document.getElementsByClassName('Side_sideBox_2G3FX')[0].style.width='360px'

		// 移除热搜中广告条目
		const dots = [...document.querySelectorAll('.wbpro-side-panel .wbpro-icon-doticon')]
		dots.forEach(e=>{e.parentElement.remove() })
    }, 500)

})();